import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/get_allocation_data_entity.dart';

GetAllocationDataEntity $GetAllocationDataEntityFromJson(Map<String, dynamic> json) {
  final GetAllocationDataEntity getAllocationDataEntity = GetAllocationDataEntity();
  final int? departmentCount = jsonConvert.convert<int>(json['departmentCount']);
  if (departmentCount != null) {
    getAllocationDataEntity.departmentCount = departmentCount;
  }
  final int? taskCount = jsonConvert.convert<int>(json['taskCount']);
  if (taskCount != null) {
    getAllocationDataEntity.taskCount = taskCount;
  }
  return getAllocationDataEntity;
}

Map<String, dynamic> $GetAllocationDataEntityToJson(GetAllocationDataEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['departmentCount'] = entity.departmentCount;
  data['taskCount'] = entity.taskCount;
  return data;
}

extension GetAllocationDataEntityExtension on GetAllocationDataEntity {
  GetAllocationDataEntity copyWith({
    int? departmentCount,
    int? taskCount,
  }) {
    return GetAllocationDataEntity()
      ..departmentCount = departmentCount ?? this.departmentCount
      ..taskCount = taskCount ?? this.taskCount;
  }
}
